package practice.w830;

public class OperDemo4 {
    public static void main(String[] args) {
        int a = 6;
        a += 10; //相当于a=(int)(a+10)
        System.out.println(a); //16
        a *= 2; //相当于a=(int)(a*2)
        System.out.println(a); //32
        a /= 6; //相当于a=(int)(a/6)
        System.out.println(a); //1

        short s = 6;
        //s = s+10; //编译错误，需强转，改为: s=(short)(s+10);
        s += 10; //相当于s=(short)(s+10)

//        int a = 6;
//        a += 10; //相当于a=(int)(a+10)
//        System.out.println(a); //16
//        a *= 2; //相当于a=(int)(a*2)
//        System.out.println(a); //32
//        a /= 6; //相当于a=(int)(a/6)
//        System.out.println(a); //1
//
//        short s = 6;
//        //s = s+10; //编译错误，需强转，改为: s=(short)(s+10);
//        s += 10; //相当于s=(short)(s+10)
    }
}
